package com.boho.system.action;


             
/**
 * @File name:  QueryMenuByLoginUserAction.java 
 * @Create on:  2010-05-10 19:30:171
 * @Author   :  陈伟
 *
 * @ChangeList
 * ---------------------------------------------------
 * Date         Editor              ChangeReasons
 *
 */
           
        

            
import java.util.List;

import cn.boho.framework.actions.ActionImp;
import cn.boho.framework.context.ActionContext;
import cn.boho.framework.service.MessageService;

import com.boho.system.service.PermissionService;

public class QueryMenuByLoginUserAction extends ActionImp {
	@Override
	protected void doException(ActionContext atx, Exception ex) {
		atx.setErrorContext("BOHO_COMMON_1004", MessageService.getMessage("BOHO_COMMON_1004"),"【系统功能菜单】" ,ex);
	}
	@SuppressWarnings("unchecked")
	@Override
	protected int performExecute(ActionContext atx) throws Exception {
		List list = PermissionService.queryMenuByPKUser(atx);
		if(list != null && !list.isEmpty()){
			atx.setValue("FUNCTION_ID", list.toArray());
		}
		return 1;
	}
	@Override
	protected int verifyParameters(ActionContext atx) throws Exception {
		return 1;
	}
}
